import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/login'
import welcome from '@/components/welcome'
import NotFound from '@/components/NotFound'
import userDetail from '@/view/userDetail'
import userWaterDetail from '@/view/userWaterDetail'
import systemPub from '@/view/systemPub'
import yewu_Charges from '@/view/yewu_Charges'
import yewu_feeConfig from '@/view/yewu_feeConfig'
import userConfig from '@/view/userConfig'
import fa_list from '@/view/fa_list'
import fa_timer from '@/view/fa_timer'
import fa_settle from '@/view/fa_settle'
import cw_recharge from '@/view/cw_recharge'
import cw_withdraw from '@/view/cw_withdraw'
import cw_withdrawRecord from '@/view/cw_withdrawRecord'
import cw_count from '@/view/cw_count'
import xitong_admin from '@/view/xitong_admin'
import xitong_access from '@/view/xitong_access'
import xitong_role from '@/view/xitong_role'
import xitong_adminRoleDetail from '@/view/xitong_adminRoleDetail'
import xitong_roleAccessDetail from '@/view/xitong_roleAccessDetail'
import xitong_log from '@/view/xitong_log'


Vue.use(Router);

const routes = [
  {
    path: '/login',
    component: Login,
    hidden: true
  },
  {
    path: '/',
    component: Login,
    hidden: true
  },
  {
    path: '/404',
    component: NotFound,
    name: '404',
    leaf: true,
    hidden: true
  },
  {
    name: "",
    path: "/",
    component: systemPub,
    iconCls: "",
    hidden: true,
    leaf: true,
    children: [
      {
        name: "用户详情",
        path: "userDetail",
        component: userDetail,
        iconCls: "",
        hidden: false,
        leaf: true
      },
      {
        name: "用户资金流水",
        path: "userWaterDetail",
        component: userWaterDetail,
        iconCls: "",
        hidden: false,
        leaf: true
      },
    ]
  },
  {
    name: "",
    path: "/",
    component: systemPub,
    iconCls: "el-icon-star-on",
    hidden: false,
    leaf: true,
    children: [
      {
        name: "首页",
        path: "welcome",
        component: welcome,
        iconCls: "el-icon-star-on",
        leaf: true,
      },
    ]
  },
  {
    name: "业务管理",
    path: "/",
    component: systemPub,
    iconCls: "el-icon-star-on",
    hidden: false,
    leaf: false,
    children: [
      {
        name: "扣息记录",
        path: "yewu_Charges",
        component: yewu_Charges,
        iconCls: "el-icon-star-on",
        hidden: false,
        leaf: true,
      },
      {
        name: "费用配置",
        path: "yewu_feeConfig",
        component: yewu_feeConfig,
        iconCls: "el-icon-star-on",
        hidden: false,
        leaf: true
      }
    ]
  },
  {
    name: "",
    path: "/",
    component: systemPub,
    iconCls: "el-icon-star-on",
    hidden: false,
    leaf: true,
    children: [
      {
        name: "用户管理",
        path: "userConfig",
        component: userConfig,
        iconCls: "el-icon-star-on",
        leaf: true,
      },
    ]
  },
  {
    name: "方案管理",
    path: "/",
    component: systemPub,
    iconCls: "el-icon-star-on",
    hidden: false,
    leaf: false,
    children: [
      {
        name: "方案列表",
        path: "fa_list",
        component: fa_list,
        iconCls: "el-icon-star-on",
        hidden: false,
        leaf: true,
      },
      {
        name: "即将到期方案",
        path: "fa_timer",
        component: fa_timer,
        iconCls: "el-icon-star-on",
        hidden: false,
        leaf: true,
      },
      {
        name: "申请结算方案",
        path: "fa_settle",
        component: fa_settle,
        iconCls: "el-icon-star-on",
        hidden: false,
        leaf: true,
      },

    ]
  },
  {
    name: "财务管理",
    path: "/",
    component: systemPub,
    iconCls: "el-icon-star-on",
    hidden: false,
    leaf: false,
    children: [
      {
        name: "充值记录",
        path: "cw_recharge",
        component: cw_recharge,
        iconCls: "el-icon-star-on",
        hidden: false,
        leaf: true,
      },
      {
        name: "提现申请",
        path: "cw_withdraw",
        component: cw_withdraw,
        iconCls: "el-icon-star-on",
        hidden: false,
        leaf: true
      },
      {
        name: "提现记录",
        path: "cw_withdrawRecord",
        component: cw_withdrawRecord,
        iconCls: "el-icon-star-on",
        hidden: false,
        leaf: true
      },
      {
        name: "财务统计",
        path: "cw_count",
        component: cw_count,
        iconCls: "el-icon-star-on",
        hidden: false,
        leaf: true
      }
    ]
  },
  {
    name: "系统管理",
    path: "/",
    component: systemPub,
    iconCls: "el-icon-star-on",
    hidden: false,
    leaf: false,
    children: [
      {
        name: "管理员账号",
        path: "xitong_admin",
        component: xitong_admin,
        iconCls: "el-icon-star-on",
        hidden: false,
        leaf: true,
      },
      {
        name: "权限管理",
        path: "xitong_access",
        component: xitong_access,
        iconCls: "el-xitong_access-star-on",
        hidden: false,
        leaf: true
      },
      {
        name: "角色管理",
        path: "xitong_role",
        component: xitong_role,
        iconCls: "el-xitong_access-star-on",
        hidden: false,
        leaf: true
      }, {
        name: "管理员配角色",
        path: "xitong_adminRoleDetail",
        component: xitong_adminRoleDetail,
        iconCls: "el-xitong_access-star-on",
        hidden: true,
        leaf: true
      },
      {
        name: "角色配权限",
        path: "xitong_roleAccessDetail",
        component: xitong_roleAccessDetail,
        iconCls: "el-xitong_access-star-on",
        hidden: true,
        leaf: true
      },
      {
        name: "日志管理",
        path: "xitong_log",
        component: xitong_log,
        iconCls: "el-xitong_access-star-on",
        hidden: false,
        leaf: true
      },
    ]
  },
]

const router = new Router({
  routes
});


export default router
